from django.db import models
from .basemodel import BaseModel

# Create your models here.


class Area(BaseModel):
    area_name = models.CharField(max_length=20,verbose_name='地区名字')    # 地区名字
    name_en = models.CharField(max_length=20,verbose_name='中文简拼')
    order_by = models.IntegerField(verbose_name='排序')
    parent = models.ForeignKey('self',on_delete=models.SET_NULL,null=True,blank=True,verbose_name='上级区域')

    class Meta:
        db_table = 'tb_area'
        verbose_name = '区域'
        verbose_name_plural = verbose_name




